package info.pinlab.pinplayer.session;

import info.pinlab.pinplayer.control.SessionControllerWithAudio;
import info.pinlab.pinplayer.session.Configurator.Key;

import java.util.HashMap;
import java.util.Map;

public class CLI{
	static Map<Key, String> runtimeConf = new HashMap<Configurator.Key, String>();
	
	
	public static void start(){
		Initializer.init(runtimeConf);

		SessionControllerWithAudio session = new SessionImpl(Initializer.effectiveConf);
//		session.setCacheManager(Initializer.cm);
		
		session.setEnrollController(Initializer.enroller);
		session.setTaskSet(Initializer.tset);
		
//		Initializer.view.setSessionController(session);
		session.setTopView(Initializer.view);
		Initializer.view.setSessionController(session);

		
		//-- set audio devices --//
		session.setAudioPlayerDeviceController(Initializer.playerDevController);
		session.setAudioPlayer(Initializer.player);

		session.setAudioRecorderDeviceController(Initializer.recorderDevController);
		session.setAudioRecorder(Initializer.recorder);
		
		
		session.startSession();
	}
	
	
	
	public static void main(String [] args){
		
		
		start();
	}

}
